import request from "@/utils/request";

/**
 * 交易账户
 * @returns
 */
export function getAssetsTradeInfo() {
  return request({
    url: "/assets/trade/info",
    method: "get"
  });
}

/**
 * 充值记录
 * @returns
 */
export function getAssetsRechargeMy() {
  return request({
    url: "/assets/recharge/my",
    method: "get"
  });
}
/**
 * 充值地址列表
 * @returns
 */
export function getAssetsRechargeList() {
  return request({
    url: "/assets/recharge/list",
    method: "get"
  });
}
/**
 * 理财账户
 * @returns
 */
export function getAssetsCloudInfo(){
  return request({
    url: "/assets/cloud/info",
    method: "get"
  });
}
/**
 * 财务记录
 */
export function getAssetsLog(parameter){
  return request({
    url: "/assets/log",
    method: "post",
    data: parameter
  });
}
/**
 * USDT可用余额
 * @param {*} parameter
 * @returns
 */
export function getAssetsUsdt(parameter){
  return request({
    url: "/assets/usdt",
    method: "post",
    data: parameter
  });
}
/**
 * 划转
 * @param {*} parameter
 * @returns
 */
export function getAssetsTransfer(parameter){
  return request({
    url: "/assets/transfer",
    method: "post",
    data: parameter
  });
}
/**
 * 币种
 * @returns
 */
export function assetsCoinSelect(){
  return request({
    url: "/assets/coin/select",
    method: "get"
  });
}

export function assetsWithdrawList(){
  return request({
    url: '/assets/withdraw/list',
    method: 'post'
  })
}

export function fetchKStock(data) {
  return request({
    url: '/stock/k',
    method: "post",
    data
  })
}
export function fetchKStockAll(data) {
  return request({
    url: '/stock/k/all',
    method: "post",
    data
  })
}


export function fetchAccount(data) {
  return request({
    url: '/assets/balance',
    method: 'POST',
    data
  })
}

/**
 * 充值
 * @param data
 * @returns {*}
 */
export function getAssetsRecharge(data={}){
  return request({
    url: "/assets/recharge",
    method: "POST",
    data
  })
}
